using UnityEngine;
using System.Collections;

public abstract class MoverBase : Action{
	
	public delegate bool boolFunction();
	public delegate bool boolFunctionMove(MoverBase mb);
	
	public int _jumpCount = 0;
	
	[HideInInspector]
	public Vector3 _movement = Vector3.zero;
	[HideInInspector]
	public Vector3 _faceDirection;
	[HideInInspector]
	public Vector3 _moveDirection;
	
	public float speed = 6.0f;
	public float jumpSpeed = 8.0f;
	public float gravity = 20.0f;
	public float maxRotationSpeed = 270;
	public int maxJumpCount = 2;
	
	//if the _movement's magnitude more than walkIdleThreshold, the animation will be set to Walk
	public float walkIdleThreshold = 0.5f;
	
	[HideInInspector]
	public Vector3 forwardVector = Vector3.forward;
	
	[HideInInspector]
	public float verticalOffset;
	[HideInInspector]
	public float horizontalOffset;
	
	public boolFunctionMove customUpdateMoveFunction;
	public boolFunction customUpdateAnimationFunction;
	
	protected abstract bool updateMove(MoverBase mb);
	protected abstract bool updateAnimation();
	
}
